package com.atguigu.dubbo.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.atguigu.dubbo.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    //RPC远程调用注解  默认 1秒  单位是毫秒
    @Reference(timeout = 1000,retries = 4,version = "1.0.1versionq"
       ,loadbalance = "roundrobin")
    private UserService userService;

    @GetMapping("/hello")
    public String hello(String name){
        return userService.sayHello(name);
    }




}
